//用于显示系统列表的grid
var testSystemGrid = Ext.create('Ext.grid.Panel',{
	title:'系统列表',
	store: testSystemGridStore,
	columns: [new Ext.grid.RowNumberer(),{
		text: '系统名称',
		dataIndex: 'name',
		sortable:false,
		flex: 1,
		filter: { //用于形成搜索框
			type: 'string',
			emptyText: '输入要搜索的系统名称',
			serializer: function(filter) {
				return filter.value;
			}
		}
	}, {
		text: '类型',
		dataIndex: 'type',
		sortable:false,
		flex: 1,
		renderer:function(value){
			return value==0?'实训项目':'真实项目';
		},
		filter: { //用于形成搜索框
			type: 'string',
			emptyText: '输入要搜索的类型',
			serializer: function(filter) {
				return filter.value;
			}
		}
	},{
		text: '创建人',
		dataIndex: 'addManName',
		sortable:false,
		flex: 1,
		filter: { //用于形成搜索框
			type: 'string',
			emptyText: '输入要搜索的类型',
			serializer: function(filter) {
				return filter.value;
			}
		}
	},{
		text : "创建时间",
		dataIndex : 'createDate',
		flex:0.5,
		renderer:function(value){
			if(value==null)
				return '无';
			else
				return value.replace('T', '  ');
		}
	},{
		text: '查看详情',
		align: 'center',
		sortable: false,
		xtype: 'actioncolumn',
		width: 90,
		items: [{
			icon: 'static/images/icons/fam/look.ico',
			tooltip: '查看详情',
			handler: function(grid, rowIndex, colIndex, actionItem, event, record, row) {
				testSystemSeeDetailClick(record,2);
			}
		}]
	}],
	plugins: {
		gridfilters: true //启用filters
	}
});

//用于显示系统附件列表的Grid
var testSystemAttachedGrid=Ext.create('Ext.grid.Panel',{
	store: testSystemAttachedStore,
	overflowX: 'hidden', //设置横向滚动条不显示
	overflowY: 'auto', //设置纵向滚动条超出高度显示
	columns: [new Ext.grid.RowNumberer(),{
		text: '附件名称',
		dataIndex: 'name',
		sortable:false,
		flex: 1,
		filter: { //用于形成搜索框
			type: 'string',
			emptyText: '输入要搜索的系统名称',
			serializer: function(filter) {
				return filter.value;
			}
		}
	}, {
		text: '大小[KB]',
		dataIndex: 'size',
		sortable:false,
	},{
		text: '下载',
		align: 'center',
		sortable: false,
		xtype: 'actioncolumn',
		width: 90,
		items: [{
			icon: 'static/images/icons/fam/download.ico',
			tooltip: '下载附件',
			handler: function(grid, rowIndex, colIndex, actionItem, event, record, row) {
				fileDownload(zuulUrl + '/' + testServiceName + '/testSystem/attached/'+ record.data.id);
			}
		}]
	},
//	{
//		text: '删除',
//		align: 'center',
//		sortable: false,
//		xtype: 'actioncolumn',
//		width: 90,
//		items: [{
//			icon: 'static/images/icons/fam/delete.gif',
//			tooltip: '删除该附件',
//			handler: function(grid, rowIndex, colIndex, actionItem, event, record, row) {
//				
//			}
//		}]
//	}
	],
	plugins: {
		gridfilters: true //启用filters
	}
});
